\(\int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx\) [1095]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 87 \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=\frac {b x}{16}-\frac {a \cos ^5(c+d x)}{5 d}+\frac {b \cos (c+d x) \sin (c+d x)}{16 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {b \cos ^5(c+d x) \sin (c+d x)}{6 d} \]

[Out]

1/16*b*x-1/5*a*cos(d*x+c)^5/d+1/16*b*cos(d*x+c)*sin(d*x+c)/d+1/24*b*cos(d*x+c)^3*sin(d*x+c)/d-1/6*b*cos(d*x+c)
^5*sin(d*x+c)/d

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2917, 2645, 30, 2648, 2715, 8} \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \cos ^5(c+d x)}{5 d}-\frac {b \sin (c+d x) \cos ^5(c+d x)}{6 d}+\frac {b \sin (c+d x) \cos ^3(c+d x)}{24 d}+\frac {b \sin (c+d x) \cos (c+d x)}{16 d}+\frac {b x}{16} \]

[In]

Int[Cos[c + d*x]^4*Sin[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

(b*x)/16 - (a*Cos[c + d*x]^5)/(5*d) + (b*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (b*Cos[c + d*x]^3*Sin[c + d*x])/(
24*d) - (b*Cos[c + d*x]^5*Sin[c + d*x])/(6*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 2648

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-a)*(b*Cos[e
 + f*x])^(n + 1)*((a*Sin[e + f*x])^(m - 1)/(b*f*(m + n))), x] + Dist[a^2*((m - 1)/(m + n)), Int[(b*Cos[e + f*x
])^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[
2*m, 2*n]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2917

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)
*(x_)]), x_Symbol] :> Dist[a, Int[(g*Cos[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Dist[b/d, Int[(g*Cos[e + f*x
])^p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]

Rubi steps \begin{align*} \text {integral}& = a \int \cos ^4(c+d x) \sin (c+d x) \, dx+b \int \cos ^4(c+d x) \sin ^2(c+d x) \, dx \\ & = -\frac {b \cos ^5(c+d x) \sin (c+d x)}{6 d}+\frac {1}{6} b \int \cos ^4(c+d x) \, dx-\frac {a \text {Subst}\left (\int x^4 \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {a \cos ^5(c+d x)}{5 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {b \cos ^5(c+d x) \sin (c+d x)}{6 d}+\frac {1}{8} b \int \cos ^2(c+d x) \, dx \\ & = -\frac {a \cos ^5(c+d x)}{5 d}+\frac {b \cos (c+d x) \sin (c+d x)}{16 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {b \cos ^5(c+d x) \sin (c+d x)}{6 d}+\frac {1}{16} b \int 1 \, dx \\ & = \frac {b x}{16}-\frac {a \cos ^5(c+d x)}{5 d}+\frac {b \cos (c+d x) \sin (c+d x)}{16 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {b \cos ^5(c+d x) \sin (c+d x)}{6 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.89 \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=-\frac {-60 b d x+120 a \cos (c+d x)+60 a \cos (3 (c+d x))+12 a \cos (5 (c+d x))-15 b \sin (2 (c+d x))+15 b \sin (4 (c+d x))+5 b \sin (6 (c+d x))}{960 d} \]

[In]

Integrate[Cos[c + d*x]^4*Sin[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

-1/960*(-60*b*d*x + 120*a*Cos[c + d*x] + 60*a*Cos[3*(c + d*x)] + 12*a*Cos[5*(c + d*x)] - 15*b*Sin[2*(c + d*x)]
 + 15*b*Sin[4*(c + d*x)] + 5*b*Sin[6*(c + d*x)])/d

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.78

method result size
derivativedivides \(\frac {-\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{5}+b \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) \(68\)
default \(\frac {-\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{5}+b \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) \(68\)
parallelrisch \(\frac {60 b x d -60 a \cos \left (3 d x +3 c \right )-120 a \cos \left (d x +c \right )-5 b \sin \left (6 d x +6 c \right )-12 a \cos \left (5 d x +5 c \right )-15 b \sin \left (4 d x +4 c \right )+15 b \sin \left (2 d x +2 c \right )-192 a}{960 d}\) \(84\)
risch \(\frac {b x}{16}-\frac {a \cos \left (d x +c \right )}{8 d}-\frac {b \sin \left (6 d x +6 c \right )}{192 d}-\frac {a \cos \left (5 d x +5 c \right )}{80 d}-\frac {b \sin \left (4 d x +4 c \right )}{64 d}-\frac {a \cos \left (3 d x +3 c \right )}{16 d}+\frac {b \sin \left (2 d x +2 c \right )}{64 d}\) \(93\)
norman \(\frac {\frac {b x}{16}-\frac {2 a}{5 d}-\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {47 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {13 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {13 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {47 b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {3 b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {15 b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16}+\frac {5 b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {15 b x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16}+\frac {3 b x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {b x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16}-\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}-\frac {2 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}\) \(303\)

[In]

int(cos(d*x+c)^4*sin(d*x+c)*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/5*a*cos(d*x+c)^5+b*(-1/6*sin(d*x+c)*cos(d*x+c)^5+1/24*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+1/16*d*
x+1/16*c))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.71 \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=-\frac {48 \, a \cos \left (d x + c\right )^{5} - 15 \, b d x + 5 \, {\left (8 \, b \cos \left (d x + c\right )^{5} - 2 \, b \cos \left (d x + c\right )^{3} - 3 \, b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \]

[In]

integrate(cos(d*x+c)^4*sin(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/240*(48*a*cos(d*x + c)^5 - 15*b*d*x + 5*(8*b*cos(d*x + c)^5 - 2*b*cos(d*x + c)^3 - 3*b*cos(d*x + c))*sin(d*
x + c))/d

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 167 vs. \(2 (76) = 152\).

Time = 0.33 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.92 \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=\begin {cases} - \frac {a \cos ^{5}{\left (c + d x \right )}}{5 d} + \frac {b x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {3 b x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {3 b x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {b x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {b \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} + \frac {b \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} - \frac {b \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right ) \sin {\left (c \right )} \cos ^{4}{\left (c \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(d*x+c)**4*sin(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

Piecewise((-a*cos(c + d*x)**5/(5*d) + b*x*sin(c + d*x)**6/16 + 3*b*x*sin(c + d*x)**4*cos(c + d*x)**2/16 + 3*b*
x*sin(c + d*x)**2*cos(c + d*x)**4/16 + b*x*cos(c + d*x)**6/16 + b*sin(c + d*x)**5*cos(c + d*x)/(16*d) + b*sin(
c + d*x)**3*cos(c + d*x)**3/(6*d) - b*sin(c + d*x)*cos(c + d*x)**5/(16*d), Ne(d, 0)), (x*(a + b*sin(c))*sin(c)
*cos(c)**4, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.60 \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=-\frac {192 \, a \cos \left (d x + c\right )^{5} - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 12 \, d x + 12 \, c - 3 \, \sin \left (4 \, d x + 4 \, c\right )\right )} b}{960 \, d} \]

[In]

integrate(cos(d*x+c)^4*sin(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/960*(192*a*cos(d*x + c)^5 - 5*(4*sin(2*d*x + 2*c)^3 + 12*d*x + 12*c - 3*sin(4*d*x + 4*c))*b)/d

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.06 \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=\frac {1}{16} \, b x - \frac {a \cos \left (5 \, d x + 5 \, c\right )}{80 \, d} - \frac {a \cos \left (3 \, d x + 3 \, c\right )}{16 \, d} - \frac {a \cos \left (d x + c\right )}{8 \, d} - \frac {b \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} - \frac {b \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {b \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} \]

[In]

integrate(cos(d*x+c)^4*sin(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/16*b*x - 1/80*a*cos(5*d*x + 5*c)/d - 1/16*a*cos(3*d*x + 3*c)/d - 1/8*a*cos(d*x + c)/d - 1/192*b*sin(6*d*x +
6*c)/d - 1/64*b*sin(4*d*x + 4*c)/d + 1/64*b*sin(2*d*x + 2*c)/d

Mupad [B] (verification not implemented)

Time = 14.66 (sec) , antiderivative size = 181, normalized size of antiderivative = 2.08 \[ \int \cos ^4(c+d x) \sin (c+d x) (a+b \sin (c+d x)) \, dx=\frac {b\,x}{16}-\frac {-\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\frac {47\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-\frac {13\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {13\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {47\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24}+\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}+\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}+\frac {2\,a}{5}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^6} \]

[In]

int(cos(c + d*x)^4*sin(c + d*x)*(a + b*sin(c + d*x)),x)

[Out]

(b*x)/16 - ((2*a)/5 + (b*tan(c/2 + (d*x)/2))/8 + (2*a*tan(c/2 + (d*x)/2)^2)/5 + 4*a*tan(c/2 + (d*x)/2)^4 + 4*a
*tan(c/2 + (d*x)/2)^6 + 2*a*tan(c/2 + (d*x)/2)^8 + 2*a*tan(c/2 + (d*x)/2)^10 - (47*b*tan(c/2 + (d*x)/2)^3)/24
+ (13*b*tan(c/2 + (d*x)/2)^5)/4 - (13*b*tan(c/2 + (d*x)/2)^7)/4 + (47*b*tan(c/2 + (d*x)/2)^9)/24 - (b*tan(c/2
+ (d*x)/2)^11)/8)/(d*(tan(c/2 + (d*x)/2)^2 + 1)^6)